#include "massage_widget.h"
#include <QScrollBar>

Massage_Widget::Massage_Widget(QWidget *parent):QWidget(parent)
{

    setFixedSize(550,534);
    setAutoFillBackground(true);

    icon_label = new QLabel();
    icon_label->setFixedSize(48,48);
    icon_label->setPixmap(QPixmap(":/qmfile/res/sp_icon.png"));
    tip_label = new QLabel();
    tip_label->setText(tr("System upgrade under way..."));

    massage_text = new QTextEdit();
    massage_text->setFixedSize(520,405);
    massage_text->setReadOnly(true);

    QHBoxLayout *hlayout1 = new QHBoxLayout();
    hlayout1->addWidget(icon_label);
    hlayout1->addSpacing(20);
    hlayout1->addWidget(tip_label);
    hlayout1->addStretch();

    QVBoxLayout *vlayout1 = new QVBoxLayout();
    vlayout1->addStretch();
    vlayout1->addLayout(hlayout1);
    vlayout1->addSpacing(7);
    vlayout1->addWidget(massage_text);
    vlayout1->addSpacing(30);

    QHBoxLayout *hlayout2 = new QHBoxLayout();
    hlayout2->addStretch();
    hlayout2->addLayout(vlayout1);
    hlayout2->addStretch();
    setLayout(hlayout2);
}

Massage_Widget::~Massage_Widget()
{
    delete this;
}
